package com.bw.es.controller;

import com.bw.common.domain.Shop;
import com.bw.common.domain.ShopVo;
import com.bw.common.result.PageResult;
import com.bw.common.result.Result;
import com.bw.es.service.EsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author：HaoYunde
 * @Package：com.bw.es.controller
 * @Project：hyd-boot
 * @name：EsController
 * @Date：2024/6/17 11:00
 */
@RestController
@RequestMapping("/es")
public class EsController {
    @Autowired
    public EsService esService;

    @PostMapping("/addEs")
    public Result addEs(@RequestBody List<Shop> list){
        return esService.addEs(list);
    }



    @PostMapping("/findShopList")
    public Result<PageResult<Shop>> findShopList(@RequestBody ShopVo shopVo){
        return esService.findShopList(shopVo);
    }

}
